package zl.mapper;

import org.apache.ibatis.annotations.Param;
import zl.bean.Category;
import zl.bean.Novel;

import java.sql.SQLException;
import java.util.List;

public interface NovelMapper {
    int addNovel(Novel novel);

    int deleteNovel(Integer id);

    int updateNovel(Novel novel);


    //查询该用户的所有小说
    List<Novel> selectNovel(Integer userId);


    //查询所有小说类型
    List<Category> selectAllCategory(@Param("keyword") String keyword);

    //根据id查小说
    Novel selectById(Integer id);

    Long selectNovelById(Integer id) throws SQLException;

    Long selectChildren(Integer id) throws SQLException;

    List<Novel> selectAllNovel(@Param("keyword") String keyword);


}
